package com.amit.struts;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class EnquiryTimingsForm extends ActionForm {
	
	private String timings;

	public String getTimings() {
		return timings;
	}

	public void setTimings(String timings) {
		this.timings = timings;
	}
	
	
	@Override
	public void reset(ActionMapping mapping, HttpServletRequest request) {
	
		
	}
	@Override
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		
		
		ActionErrors errors=new ActionErrors();
		if(timings==null||timings.length()==0)
		{
			errors.add("timings", new ActionError("error.timings.required"));
		}
		return errors;
	}
	

}
